macro(be_pack projectName)
    # 设置RPATH（运行时库搜索路径）
    set_target_properties(${projectName} PROPERTIES
    OUTPUT_NAME ${projectName}
    INSTALL_RPATH "\${ORIGIN}/../lib"
    )

    # 安装规则
    install(TARGETS ${projectName} DESTINATION .)
    install(TARGETS imgui glfwKit DESTINATION lib)
    
    # 包括 CPack 打包配置
    include(InstallRequiredSystemLibraries)
    set(CPACK_RESOURCE_FILE_LICENSE ${NATIVERENDER_ROOT_PATH}/License.txt)
    set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
    set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
    set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
    # set(CPACK_GENERATOR NSIS64)
    set(CPACK_GENERATOR "ZIP")
    set(CPACK_PACKAGE_NAME ${projectName})
    set(CPACK_PACKAGE_FILE_NAME ${projectName}-${PROJECT_VERSION})
    set(CPACK_PACKAGE_DIRECTORY ${NATIVERENDER_ROOT_PATH}/bin)
    include(CPack)
endmacro()
